﻿#ifndef AL_ADDITEM_H
#define AL_ADDITEM_H

#include <head/g_pch.h>
#include <head/m_message.h>
#include <head/db_helper.h>
#include "m_fhs.h"

namespace Ui {
class AL_AddItem;
}

class AL_AddItem : public QDialog
{
    Q_OBJECT

public:
    explicit AL_AddItem(QWidget *parent = nullptr);
    ~AL_AddItem();

    void updateProviders();
    void updateUnits();
    bool addItem(const QString &provider,
                 const QString &name,
                 int number,
                 const QString &remark);

private slots:
    void on_providers_currentTextChanged(const QString &text);
    void on_btn_submit_clicked();
    void on_isMulti_stateChanged(int state);

private:
    Ui::AL_AddItem *ui;

    QString table;
};

#endif // AL_ADDITEM_H
